// JavaScript Document

function init(){
var user=document.getElementsByTagName("input");
var xlr=document.getElementById("xlr");
var xz=document.getElementById("xz");
var zt=document.getElementById("zt");
var ztli=zt.getElementsByTagName("li");
var countingName = document.getElementById('countingRoomName');
var f=true;
  xlr.onclick=function(){
	  if(f){
	  zt.style.display="block";
	  xlr.style.backgroundImage="url(./public/stylesheets/normal/images/x2.png)";
	  f=false;}
	  else{
		zt.style.display="none";
		  xlr.style.backgroundImage="url(./public/stylesheets/normal/images/x.png)";
	  f=true;  
		  }
	  }
 
 for(var i=0;i<ztli.length;i++){
	 ztli[i].onclick=function(){
		 countingName.value=this.getAttribute('value');
		 xz.value=this.innerHTML;
		 zt.style.display="none";
		   xlr.style.backgroundImage="url(./public/stylesheets/normal/images/x.png)";
	  f=true;
		 }
	 }
}
window.onload=function(){init()}